import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const routes =  [
      
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/Login.vue')
    },
    {
        path: '/',
        redirect: '/login',
        component: () => import('../components/common/Home.vue'),
        children: [
            {
                path: '/home',
                component: () => import('@/views/index/page1.vue'),
                meta: { title: '首页' }
            },
            {
                path: '/page2',
                component: () => import('@/views/index/page2.vue'),
                meta: { title: '登录日志' }
            },
            

            {
                path: "/goods",
                name: "goods",
                meta: { title: "商品列表" },
                component: () => import("@/views/goods/goods.vue")
            },

            {
                path: "/add_good",
                name: "add_goods",
                meta: { title: "添加商品" },
                component: () => import("@/views/goods/add_good.vue"),
            },

            {
                path: "/processGoods",
                name: "processGoods",
                meta: { title: "商品审核" },
                component: () => import("@/views/goods/processGoods.vue"),
            },

            
            {
                path: "/goodsRecycling",
                name: "goodsRecycling",
                meta: { title: "商品审核" },
                component: () => import("@/views/goods/goodsRecycling.vue"),
            },

            {
                path:"/orders",
                name:"orders",
                meta: { title: "订单列表" },
                component: ()=> import("@/views/orders/orders.vue")
            },

            {
                path:"/exchangeorders",
                name:"exchangeorders",
                meta: { title: "退换列表" },
                component: ()=> import("@/views/orders/exchangeorders.vue")
            },

            {
                path:'/express_template',
                name:'express_template',
                meta: { title: "快递模板" },
                component: ()=> import("@/views/operationmanagement/express_template.vue")
            },
            {
                path:'/maxout',
                name:'maxout',
                meta: { title: "满减活动" },
                component: ()=> import("@/views/operationmanagement/maxout_activity")
            },
            {
                path:'/giveaway_event',
                name:'giveaway_event',
                meta: { title: "满赠活动" },
                component: ()=> import("@/views/operationmanagement/giveaway_event")
            },
            {
                path:'/financial_statements',
                name:'financial_statements',
                meta: { title: "财务报表" },
                component :()=>import("@/views/financial/financial_statements.vue")
            },


            {
                path: '/categoryList',
                component: () => import('@/views/category/categoryList.vue'),
                meta: { title: '类目列表' }
            },
            {
                path: '/specList',
                component: () => import('@/views/category/specList.vue'),
                meta: { title: '规格列表' }
            },
            
            {
                path: '/celebIntroduce',
                component: () => import('@/views/culture/celebIntroduce.vue'),
                meta: { title: '名人介绍' }
            },
            {
                path: '/articleList',
                component: () => import('@/views/culture/articleList.vue'),
                meta: { title: '文章管理' }
            },
            {
                path: '/inventoryList',
                component: () => import('@/views/inventory/inventoryList.vue'),
                meta: { title: '库存列表' }
            },
            {
                path: '/inboundRecord',
                component: () => import('@/views/inventory/inboundRecord.vue'),
                meta: { title: '入库记录' }
            },
            {
                path: '/transferOutboundRecord',
                component: () => import('@/views/inventory/transferOutboundRecord.vue'),
                meta: { title: '退货入库' }
            },
            {
                path: '/outboundRecord',
                component: () => import('@/views/inventory/outboundRecord.vue'),
                meta: { title: '出库记录' }
            },
            {
                path: '/memberList',
                component: () => import('@/views/member/memberList.vue'),
                meta: { title: '会员列表' }
            },
            {
                path: '/memberLev',
                component: () => import('@/views/member/memberLev.vue'),
                meta: { title: '会员登记' }
            },
            {
                path: "/userManage",
                meta: { title: "用户管理" },
                component: () => import("@/views/sysSetting/userManage.vue"),
            },

            {
                path: "/roleManage",
                meta: { title: "角色管理" },
                component: () => import("@/views/sysSetting/roleManage.vue"),
            },
            
            
        ]
    },
  
]
export default new Router({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})
